package com.job.Gai_Yian.Homework0709;

import sun.security.util.Length;

/**
 * @author Gai_Yian
 * @version 1.0
 * @since 2022-07-11 00:37:07
 */
public class YangHuiTriangle {
    public static void main(String[] args){
        int tri[][]=new int[7][];
        for (int n=0;n<tri.length;n++){
            tri[n]=new int[n+1];
            for (int m=0;m<tri[n].length-1;m++){
                if (n==0||m==0||tri[n].length==m){
                    tri[n][m]=1;
                }
                else{
                    tri[n][m]=tri[n-1][m]+tri[n-1][m-1];
                }
                System.out.print(tri[n][m]+"\t");
            }
            System.out.println();
        }
    }
}
